import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'

const getstore = ({
    actionCreators,
    UIcomponent,
    type
}) => {

    return connect(
        state => state[type],
        dispatch => bindActionCreators( actionCreators,dispatch)
    )(UIcomponent)
}

export default getstore
